import React from 'react';
import clsname from '../lib/clsname';
const comClsName = `${clsname.name}-empty-viewer`;
const desc = {
    zh: '没有可供预览的文件',
    en: 'The previewable file is empty'
}
function EmptyViewer(props) {
    const { lang, emptyRender, invoice } = props;
    const defaultDesc = lang && desc?.[lang] ? desc[lang] : desc.zh;
    return <div className={comClsName}>
        <div className="desc">
            {typeof emptyRender === 'function' ?
                emptyRender(invoice, lang) :
                defaultDesc
            }
        </div>
    </div>
}
export default EmptyViewer;